home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / graphics / draw.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-05-16  |  2.7 KB  |  97 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Basic Drawing Methods"
  4.    ClientHeight    =   5070
  5.    ClientLeft      =   1185
  6.    ClientTop       =   1230
  7.    ClientWidth     =   7365
  8.    Height          =   5475
  9.    Left            =   1125
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   126.119
  13.    ScaleMode       =   0  'User
  14.    ScaleWidth      =   100
  15.    Top             =   885
  16.    Width           =   7485
  17.    Begin CommandButton Command1 
  18.       Caption         =   "Circle"
  19.       Height          =   615
  20.       Left            =   240
  21.       TabIndex        =   0
  22.       Top             =   120
  23.       Width           =   1335
  24.    End
  25.    Begin CommandButton Command2 
  26.       Caption         =   "Point"
  27.       Height          =   615
  28.       Left            =   240
  29.       TabIndex        =   1
  30.       Top             =   960
  31.       Width           =   1335
  32.    End
  33.    Begin CommandButton Command3 
  34.       Caption         =   "Line"
  35.       Height          =   615
  36.       Left            =   240
  37.       TabIndex        =   2
  38.       Top             =   1800
  39.       Width           =   1335
  40.    End
  41.    Begin CommandButton Command6 
  42.       Caption         =   "Box"
  43.       Height          =   615
  44.       Left            =   240
  45.       TabIndex        =   5
  46.       Top             =   2640
  47.       Width           =   1335
  48.    End
  49.    Begin CommandButton Command4 
  50.       Caption         =   "Print Hello"
  51.       Height          =   615
  52.       Left            =   240
  53.       TabIndex        =   3
  54.       Top             =   3480
  55.       Width           =   1335
  56.    End
  57.    Begin CommandButton Command5 
  58.       Caption         =   "Clear Screen"
  59.       Height          =   615
  60.       Left            =   240
  61.       TabIndex        =   4
  62.       Top             =   4320
  63.       Width           =   1335
  64.    End
  65. Option Explicit
  66. Const MINIMIZED = 1, NORMAL = 0, PI = 3.14
  67. Const MARGIN = 10
  68. Const OFFSET = PI / 2
  69. Sub Command1_Click ()
  70.     Form1.ScaleWidth = 100
  71.     Form1.ScaleHeight = 100
  72.     Circle (ScaleWidth / 2, ScaleHeight / 2), ScaleWidth / 4
  73. End Sub
  74. Sub Command2_Click ()
  75.     Form1.ScaleWidth = 100
  76.     Form1.ScaleHeight = 100
  77.     Form1.PSet (Form1.ScaleWidth / 2, Form1.ScaleHeight / 2)
  78. End Sub
  79. Sub Command3_Click ()
  80.     Form1.ScaleWidth = 100
  81.     Form1.ScaleHeight = 100
  82.     Form1.Line (50, 50)-(75, 75), RGB(255, 0, 0)
  83. End Sub
  84. Sub Command4_Click ()
  85.     Form1.CurrentX = 70
  86.     Form1.CurrentY = 60
  87.     Print "Hello"
  88. End Sub
  89. Sub Command5_Click ()
  90.     Form1.Cls
  91. End Sub
  92. Sub Command6_Click ()
  93.     Form1.ScaleWidth = 100
  94.     Form1.ScaleHeight = 100
  95.     Form1.Line (25, 50)-(50, 55), RGB(255, 0, 0), BF
  96. End Sub
  97.